<?php
	$patternTel = "/^(((\+33(| |\-|.))|0){1}[0-9]{1}((| |\-|\.)[0-9]{2}){4})$/";
	$patternNom = "[^\+?{}.><]";
	$messageErreur = "La saisie contient des caractères interdits";
	if (isset($_POST['nom']))
	{
		$sansControle = $_POST['nom'];
		$htmlentitites = htmlentities($_POST['nom']);
		$reponse = true;
		if (preg_match($patternNom,$_POST['nom']) == 1)
		{
			$avecControle = $_POST['nom'];
		}
		else
		{
			$avecControle = $messageErreur;
		}
	}
	if (isset($_POST['tel']))
	{
    $tel = $messageErreur;
		if (preg_match($patternTel,$_POST['tel']) == 1)
		{
			$tel = $_POST['tel'];
		}

		
		$reponse = true;
	}
?>